<template>
    <div>自定义TS文件</div>
    <p>{{ aaa }}</p>
    <ul>
        <li v-for="item in obj" :key="item.id">{{ item.name }}</li>
    </ul>
    <hr>
    {{ zxcv }}
</template>
<script setup lang='ts'>
import { ref, reactive, computed } from "vue";
import type {ObjInfo,Iobj} from '../utils/home'
const aaa = ref(100);
//复杂类型
//先定义类型别名


let obj = ref<ObjInfo[]>([{
    id: 1,
    name: "丢掉的111",
    isShow: true
}, {
    id: 1,
    name: "丢掉的222",
    isShow: true
}])
const zxcv = ref<Iobj>({
  id: 0,
  name: "",
  flag: false,
  areaTree:[{
    sex:"男",
    age:20,
  },{
    sex:"女",
    age:15,
  }]
})
</script>
<style scoped lang='scss'></style>